import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { OrderService } from '../../../../providers/order-service';



@Component({
  selector: 'page-order-detail',
  templateUrl: 'detail.html'
})

export class OrderDetailPage {
  order:any
  comments=[]
  constructor(
     public orderService: OrderService,
     public navCtrl: NavController,
     public param: NavParams
    ) { 
      this.order =  param.get('order')
      this.loadCommemt()
    }
    public loadCommemt() {
      this.orderService.loadCommemt(this.order.id).then(data => this.comments = data)
    }
}
